home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
tests
/
rloadd.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
632b
|
40 lines
#include <iostream.h>
#include <stdio.h>
#include <osfcn.h>
#include <libc.h>
#include "RJS/Transport.h"
#include "RJS/KernelVar.h"
#include "RJS/NDR.h"
#include "Date.h"
#include "XKernelVar.h"
int main(int argc, char *argv[])
{
if (argc!=2) { cerr << "usage: " << argv[0] << " port" << endl; exit(1); }
char buffer[1024];
NDR_send ndr;
KernelVar kernel;
Xkern_loadav load;
InetStream server,client;
InetAddress port(atoi(argv[1]));
ndr.init(buffer,1024);
server.socket_server(port);
while(1) {
server.accept(client);
kernel.loadav(load);
ndr.reset();
ndr << load;
client << ndr;
}
exit(0);
}